#pragma once
#include <QtGui>
#include "src/Manager.h"
#include "src/Container/Attribute.h"
#include "src/Container/Question.h"
#include "src/Container/Result.h"
#include "src/Container/ResponseAttribute.h"
#include "TreeNode.h"


namespace XpsAssets
{

	class AssetWriter
	{
		QXmlStreamWriter xmlout;
	
	public:
		AssetWriter(void);
		~AssetWriter(void);
		
		Manager<Attribute> attributes;
		Manager<Question> questions;
		Manager<Result> results;
		Manager<Response> responses;
		QList<TreeNode*> tree;
		void write(QString filename);

	private:
		void writeQuestionsPool();
		void writeAttributesPool();
		void writeTreeNodes();
		void writeResults();

	};

}